﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace program
{
    public partial class SplashForm : Form
    {
        public SplashForm()
        {
            if (System.IO.File.Exists("mcorder.png")) this.BackgroundImage = new System.Drawing.Bitmap("mcorder.png");
            else this.BackgroundImage = new System.Drawing.Bitmap(1, 1);

            this.Height = this.BackgroundImage.Height;
            this.Width = this.BackgroundImage.Width;

            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.ShowInTaskbar = false;
            InitializeComponent();

            Bitmap b = new Bitmap(this.BackgroundImage);
            this.TransparencyKey = b.GetPixel(0, 0);

            b.MakeTransparent(b.GetPixel(0, 0));

            this.BackgroundImage = b;
        }

        private void SplashForm_Load(object sender, EventArgs e)
        {

            this.Height = BackgroundImage.Height;
            this.Width = BackgroundImage.Width;

            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
        }
    }
}
